package com.cy.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.Id;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @ClassName Order
 * @Deserintion 订单表
 * @Author ciyuan
 * @Date 2018/11/23/023 0:57
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity(name = "order_t")
public class Order {
    @Id
    private String orderId;

    /**
     *渠道id
     */
    private String chanId;
    private String productId;
    private String chanUserId;
    /**
     * @see com.cy.entity.enums.OrderType
     */
    private String orderType;

    /**
     * @see com.cy.entity.enums.OrderType
     */
    private String orderStatus;
    private String outerOrderId;
    private BigDecimal amount;
    private String memo;
    private Date createAt;
    private Date updateAt;

    @Override
    public String toString() {
        return "Order{" +
                "orderId='" + orderId + '\'' +
                ", chanId='" + chanId + '\'' +
                ", productId='" + productId + '\'' +
                ", chanUserId='" + chanUserId + '\'' +
                ", orderType='" + orderType + '\'' +
                ", orderStatus='" + orderStatus + '\'' +
                ", outerOrderId='" + outerOrderId + '\'' +
                ", amount=" + amount +
                ", memo='" + memo + '\'' +
                ", createAt=" + createAt +
                ", updateAt=" + updateAt +
                '}';
    }
}
